package com.xiongtian.springframework.beans.factory.support;

import com.xiongtian.springframework.beans.factory.config.BeanDefinition;

import java.lang.reflect.Constructor;

/**
 * @Author: xiongtian
 * @CreateTime: 2025-03-26  09:50
 * @Version: 1.0
 * @Description: 实例化策略接口
 */

public interface InstantiationStrategy {

    /**
     * @param beanDefinition Bean定义
     * @param beanName       Bean名称
     * @param constructor    拿到符合入参信息相对应的构造函数
     * @param args           构造函数入参
     * @return
     */
    Object instantiate(BeanDefinition beanDefinition, String beanName, Constructor constructor, Object[] args);
}
